package com.vita.testCore.value;

import java.util.UUID;

/**
 * inout数值必须在out数值之前set
 * output可缺省
 */
public class CvtValue<I,O> extends Cvt implements CvtMetaInfo {
    private final static String KEY = "CvtValue";
    private String id;
    private I inout;
    private O output;

    {
        id = UUID.randomUUID().toString().replaceAll("-","");
    }
    
    public CvtValue(I i) {
        this.inout = i;
    }

    public CvtValue(I i,O o) {
        this.inout = i;
        this.output = o;
    }

    public void input(I i){
        this.inout = i;
    }

    public I getInput(){
       return this.inout;
    }

    public void output(O o){
        this.output = o;
    }

    public O getOutput(){
        return this.output;
     }


    @Override
    public String getKey() {
        return KEY;
    }

    @Override
    public String getId() {
        return id;
    }
}
